Class NotificationSDKServerSettings
- java.lang.Object
-
- com.vasco.digipass.sdk.utils.notification.server.NotificationSDKServerSettings
-
public class NotificationSDKServerSettings extends java.lang.ObjectThe NotificationSDKServerSettings object encompasses the NotificationSDKServer object's specific settings. It must be provided to theNotificationSDKServer(NotificationSDKServerCredentials credentials, NotificationSDKServerSettings settings, NotificationSDKServerCallbacks callbacks)constructor.If your organization operates behind a firewall that restricts the traffic to or from the Internet, a proxy can be configured to communicate to the various notification servers.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CONNECTION_TIMEOUTDefault timeout (in milliseconds) after which a sending connection should be closed.static NotificationSDKServerProxyTypesDEFAULT_PROXY_TYPEDefault proxy typestatic intDEFAULT_SOCKS_PROXY_PORTDefault SOCKS proxy portstatic intDEFAULT_TERMINATE_TIMEOUTDefault timeout (in milliseconds) whenNotificationSDKServer.awaitSendTerminationAndFinish()is called.static intDEFAULT_THREAD_MAX_NUMBERDefault maximum number of threads allowed to run for sending push messages.
-
Constructor Summary
Constructors Constructor Description NotificationSDKServerSettings()Creates aNotificationSDKServerSettingsobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.vasco.digipass.sdk.utils.notification.server.mock.ApnsServerMockConfigurationgetApnsServerMockConfiguration()Gets the APNs server mock configuration.intgetConnectionTimeout()Gets the timeout (in milliseconds) after which a sending connection should be closed.java.lang.StringgetProxyHostname()Gets the configured proxy hostname.java.lang.StringgetProxyPassword()Gets the password used to authenticate to the proxy server.intgetProxyPort()Gets the configured proxy port.NotificationSDKServerProxyTypesgetProxyType()Gets the configured proxy type.java.lang.StringgetProxyUsername()Gets the username used to authenticate to the proxy server.intgetTerminateTimeout()Gets the maximum time to wait (in milliseconds) when awaitSendTermination is called.intgetThreadMaxNumber()Gets the maximum number of threads allowed to run for sending push messages.voidsetApnsServerMockConfiguration(com.vasco.digipass.sdk.utils.notification.server.mock.ApnsServerMockConfiguration apnsServerMockConfiguration)Sets the APNs server mock configuration.voidsetConnectionTimeout(int connectionTimeout)Sets the timeout (in milliseconds) after which a sending connection should be closed.voidsetProxy(NotificationSDKServerProxyTypes proxyType, java.lang.String hostname, int port, java.lang.String username, java.lang.String password)Sets the proxy settings if required by your organization.voidsetTerminateTimeout(int terminateTimeout)Sets the maximum time to wait (in milliseconds) when awaitSendTermination is called.voidsetThreadMaxNumber(int threadMaxNumber)Sets the maximum number of threads allowed to run for sending push messages.
-
-
-
Field Detail
-
DEFAULT_THREAD_MAX_NUMBER
public static final int DEFAULT_THREAD_MAX_NUMBER
Default maximum number of threads allowed to run for sending push messages. This constant's value is 20.- See Also:
- Constant Field Values
-
DEFAULT_CONNECTION_TIMEOUT
public static final int DEFAULT_CONNECTION_TIMEOUT
Default timeout (in milliseconds) after which a sending connection should be closed. This constant's value is 20000.- See Also:
- Constant Field Values
-
DEFAULT_TERMINATE_TIMEOUT
public static final int DEFAULT_TERMINATE_TIMEOUT
Default timeout (in milliseconds) whenNotificationSDKServer.awaitSendTerminationAndFinish()is called. This constant's value is 60000.- See Also:
- Constant Field Values
-
DEFAULT_PROXY_TYPE
public static final NotificationSDKServerProxyTypes DEFAULT_PROXY_TYPE
Default proxy type
-
DEFAULT_SOCKS_PROXY_PORT
public static final int DEFAULT_SOCKS_PROXY_PORT
Default SOCKS proxy port- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NotificationSDKServerSettings
public NotificationSDKServerSettings()
Creates aNotificationSDKServerSettingsobject. Each specific setting must be set using the dedicated accessor.
-
-
Method Detail
-
getThreadMaxNumber
public int getThreadMaxNumber()
Gets the maximum number of threads allowed to run for sending push messages.- Returns:
- the maximum number of threads allowed to run for sending push messages.
-
setThreadMaxNumber
public void setThreadMaxNumber(int threadMaxNumber)
Sets the maximum number of threads allowed to run for sending push messages. Must be greater than 0.- Parameters:
threadMaxNumber- maximum number of threads allowed to run for sending push messages
-
getConnectionTimeout
public int getConnectionTimeout()
Gets the timeout (in milliseconds) after which a sending connection should be closed.- Returns:
- the timeout (in milliseconds) after which a sending connection should be closed.
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
Sets the timeout (in milliseconds) after which a sending connection should be closed. Must be greater than 0.- Parameters:
connectionTimeout- timeout (in milliseconds) after which a sending connection should be closed.
-
getTerminateTimeout
public int getTerminateTimeout()
Gets the maximum time to wait (in milliseconds) when awaitSendTermination is called.- Returns:
- the maximum time to wait (in milliseconds) when awaitSendTermination is called
-
setTerminateTimeout
public void setTerminateTimeout(int terminateTimeout)
Sets the maximum time to wait (in milliseconds) when awaitSendTermination is called. Must be greater than 0.- Parameters:
terminateTimeout- maximum time to wait (in milliseconds) whenNotificationSDKServer.awaitSendTerminationAndFinish()is called
-
setProxy
public void setProxy(NotificationSDKServerProxyTypes proxyType, java.lang.String hostname, int port, java.lang.String username, java.lang.String password)
Sets the proxy settings if required by your organization.- Parameters:
proxyType- Type of proxy used. HTTP and SOCKS proxies are supported.hostname- the hostname of the proxy server to which the client should connect.port- the port of the proxy server to which the client should connect.username- the username used to authenticate to the proxy server, can be null if no authentication is required.password- the password used to authenticate to the proxy server, can be null if no authentication is required.
-
getProxyType
public NotificationSDKServerProxyTypes getProxyType()
Gets the configured proxy type.- Returns:
- the proxy type.
-
getProxyHostname
public java.lang.String getProxyHostname()
Gets the configured proxy hostname.- Returns:
- the proxy hostname.
-
getProxyPort
public int getProxyPort()
Gets the configured proxy port.- Returns:
- the proxy port.
-
getProxyUsername
public java.lang.String getProxyUsername()
Gets the username used to authenticate to the proxy server.- Returns:
- the username used to authenticate to the proxy server.
-
getProxyPassword
public java.lang.String getProxyPassword()
Gets the password used to authenticate to the proxy server.- Returns:
- the password used to authenticate to the proxy server.
-
getApnsServerMockConfiguration
public com.vasco.digipass.sdk.utils.notification.server.mock.ApnsServerMockConfiguration getApnsServerMockConfiguration()
Gets the APNs server mock configuration.- Returns:
- the APNs server mock configuration.
-
setApnsServerMockConfiguration
public void setApnsServerMockConfiguration(com.vasco.digipass.sdk.utils.notification.server.mock.ApnsServerMockConfiguration apnsServerMockConfiguration)
Sets the APNs server mock configuration.- Parameters:
apnsServerMockConfiguration- APNs server mock configuration.
-
-